package com.hqyj.controller;

import com.hqyj.pojo.MakeApply;
import com.hqyj.service.service.InsertData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;

@Controller
@RequestMapping("/insert")
public class serviceApplyController {
    //客户申请插入数据库
    @Autowired(required = false)
    InsertData insertDate;

    @RequestMapping("/deal")
    @ResponseBody
    public HashMap<String,Object> insertApply(MakeApply makeApply){
        HashMap<String,Object> map = new HashMap<String,Object>();
        int flag = insertDate.addApply(makeApply);
        map.put("flag",flag);
        return map;
    }
}
